package cn.tedu.di;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class Config {
    //青龙偃月刀保存到Spring容器
    @Bean
    public DragonBlade blade(){
       return new DragonBlade();
    }
    @Bean
    public DragonBlade blade1(){
        return new DragonBlade();
    }
    @Bean
    public GuanYu guan(DragonBlade blade){
        GuanYu guan=new GuanYu();
        guan.setDragonBlade(blade);
        return guan;
    }
}
